<?php 
use com\soka as so;
class Menu_Ctl  extends so\SokaController
{
	private $_menu;
	public function _init(){
		$this->_menu = $this->setModel('menu');
	}
	public function index()
	{
		app\helpers\MenuPages::$menu = $this->_menu->get_menu_item();
		$this->menu_items = app\helpers\MenuPages::get_menu();
		$this->mget = $this->_menu->get(1);
		$this->m = app\helpers\MenuPages::get_menu2a(0, $this->_menu->get(1));
	}

	public function view(){
		parent::view(false);
		$ma = $this->_menu->get();
		header('Content-type: application/json');
		echo json_encode($this->_menu->get());
	}
}
